#ifndef LOG_H_
#define LOG_H_

#include <fstream>
#include <iostream>
#include <sstream>
#include <unistd.h>
#include <fcntl.h>
#include "FuncionesComunes.h"

using namespace std;

class Log {
private:
	string filename;
	int fd;
	struct flock fl;
	bool is_debug;
	string getDate();

public:
	Log();
	Log(string filename);
	Log(Log &l);
	Log & operator=(const Log &l);
    void activeDebug(bool active);
    void escribir(string logline);
	virtual ~Log();
};

#endif /* LOG_H_ */
